(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["SearchBar"] = factory();
	else
		root["grimm"] = root["grimm"] || {}, root["grimm"]["SearchBar"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "./";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 267);
/******/ })
/************************************************************************/
/******/ ({

/***/ 267:
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(268)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else if (typeof exports !== "undefined") {
    factory(module, exports, require('../../components/SearchBar'));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod, mod.exports, global.SearchBar);
    global.index = mod.exports;
  }
})(this, function (module, exports, _SearchBar) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  var _SearchBar2 = _interopRequireDefault(_SearchBar);

  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
      default: obj
    };
  }

  _SearchBar2.default.install = function (Vue) {
    Vue.component(_SearchBar2.default.name, _SearchBar2.default);
  };
  exports.default = _SearchBar2.default;
  module.exports = exports['default'];
});

/***/ }),

/***/ 268:
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else if (typeof exports !== "undefined") {
    factory(module, exports);
  } else {
    var mod = {
      exports: {}
    };
    factory(mod, mod.exports);
    global.index = mod.exports;
  }
})(this, function (module, exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  var name = 'grimm-searchbar';
  exports.default = {
    name: name,
    props: {
      className: {
        default: name
      },
      placeholder: {
        type: [String, Number, Boolean],
        default: name
      },
      icon: {
        type: String,
        default: ''
      },
      cancelBtn: {
        type: [String, Number],
        default: ''
      },
      searchBtn: {
        type: [String, Number],
        default: ''
      },
      empty: {
        type: Boolean,
        default: false
      },
      value: {
        type: [String, Number, Boolean]
      },
      onChange: {
        type: Function,
        default: function _default(_) {
          return _;
        }
      }
    },
    computed: {
      element: function element() {
        return 'input';
      }
    },
    render: function render(h) {
      var _this = this;

      var children2 = [h('span', {
        'class': 'iconfont search'
      }), h('grimm-input', {
        props: {
          placeholder: this.placeholder,
          value: this.value
        },
        on: {
          input: function input(value) {
            try {
              _this.onChange(value);
            } finally {
              _this.$emit('input', value);
            }
          }
        }
      })];
      if (this.empty && this.value) {
        children2.push(h('span', {
          'class': 'iconfont error-full',
          on: {
            click: function click() {
              try {
                _this.$emit('input', '');
                _this.$emit('cancel');
              } catch (error) {
                console.log(error);
              }
            }
          }
        }));
      }
      var children = [h('div', {
        'class': name + '-content'
      }, children2)];
      if (this.icon) {
        children.unshift(h('span', {
          'class': 'iconfont ' + this.icon,
          on: {
            click: function click() {
              try {
                _this.$emit('back');
              } catch (error) {
                console.log(error);
              }
            }
          }
        }));
      }
      if (this.cancelBtn) {
        children.push(h('span', {
          'class': name + '-cancel',
          on: {
            click: function click() {
              try {
                _this.$emit('input', '');
                _this.$emit('cancel');
              } catch (error) {
                console.log(error);
              }
            }
          }
        }, this.cancelBtn));
      }
      if (this.searchBtn) {
        children.push(h('span', {
          'class': name + '-searchBtn',
          on: {
            click: function click() {
              try {
                _this.$emit('search');
              } catch (error) {
                console.log(error);
              }
            }
          }
        }, this.searchBtn));
      }
      return h('div', {
        'class': name
      }, children);
    }
  };
  module.exports = exports['default'];
});

/***/ })

/******/ });
});